import App from './App'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false

import { http } from '@/utils/luch-request/index.js'
import myconfig  from "@/config/index";
import {apiObj} from "@/utils/api-obj";
import store from "@/config/store.js";
import {commonAjax} from "@/utils/common-ajax";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; // 必须引入样式文件

// 注册全局组件
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
Vue.component('mescroll-body', MescrollBody)
Vue.component('mescroll-uni', MescrollUni)
Vue.use(ElementUI);
 
// 引入组件
import headerNavBack from '@/components/modal/header-navback.vue'
//注册全局组件  
Vue.component('header-navback', headerNavBack);

//引入登录
import wechatLogin from '@/components/modal/wechat-login.vue';
Vue.component('wechat-login', wechatLogin);


Vue.prototype.moveHandle = function(){
	return ; //注册全局方法 当页面有遮罩层的时候 禁止页面滚动
}
Vue.prototype.navback = function(){
	apiObj.navbackTo()
}
Vue.prototype.$commonAjax = commonAjax;
Vue.prototype.$api = apiObj;
Vue.prototype.$http = http;
Vue.prototype.myconfig = myconfig;

App.mpType = 'app'
const app = new Vue({
    ...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif